<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog"
  aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{ backdrop: 'static', keyboard: !saving }">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form *ngIf="active" #userForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
        <div class="modal-header">
          <h4 class="modal-title">
            <span>加工单信息录入</span>
          </h4>
          <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="form-group col-md-2">
              <label for="taskCode">任务号 </label>
            </div>
            <div class="form-group col-md-4">
              <input id="taskCode" #codeInput="ngModel" class="form-control" type="text" name="taskCode"
                [(ngModel)]="_processingViewDto.taskCode" disabled />
            </div>
            <div class="col-md-2">
              <label for="picNo">产品图号 *</label>
            </div>
            <div class="form-group col-md-4">
              <input id="picNo" #picNoInput="ngModel" type="text" name="picNo" class="form-control"
                [(ngModel)]="_processingViewDto.picNo" disabled />
            </div>
          </div>
          <div class="row">
            <div class="col-md-2">
              <label for="taskName">产品名称 </label>
            </div>
            <div class="form-group col-md-4">
              <input id="taskName" #taskNameInput="ngModel" type="text" name="taskName" class="form-control"
                [(ngModel)]="_processingViewDto.taskName" disabled />
            </div>

            <div class="col-md-2">
              <label for="OutsouringAmount">申请数量 </label>
            </div>
            <div class="form-group col-md-4">
              <input id="OutsouringAmount" #OutsouringAmountInput="ngModel" type="text" name="OutsouringAmount"
                class="form-control" [(ngModel)]="_processingViewDto.outsouringAmount" disabled />
            </div>
          </div>
          <div class="row">
            <div class="col-md-2">
              <label for="ProcessingAmount">加工数量 *</label>
            </div>
            <div class="form-group col-md-4">
              <p-spinner size="20" name="processingAmount" [(ngModel)]="_processingViewDto.processingAmount" [min]="0"
                [max]="100"></p-spinner>
              <!-- <input id="ProcessingAmount" type="text" #ProcessingAmountInput="ngModel" name="ProcessingAmount"
                class="form-control" [(ngModel)]="_processingViewDto.processingAmount" required maxlength="24" />
              <validation-messages [formCtrl]="ProcessingAmountInput"></validation-messages> -->
            </div>
            <div class="col-md-2">
              <label for="Processingstatus">加工状态 *</label>
            </div>
            <div class="form-group col-md-4">
              <input id="Processingstatus" type="text" #ProcessingstatusInput="ngModel" name="Processingstatus"
                class="form-control" [(ngModel)]="_processingViewDto.processingstatus" required maxlength="24" />
              <validation-messages [formCtrl]="ProcessingstatusInput"></validation-messages>
            </div>
          </div>
          <div class="row">
            <div class="col-md-2">
              <label for="Progressrequest">进度要求 *</label>
            </div>
            <div class="form-group col-md-4"> 
              <input id="Progressrequest" type="text" #ProgressrequestInput name="Progressrequest" class="form-control"
                [(ngModel)]="_processingViewDto.progressrequest" required bsDatepicker>
              <validation-messages [formCtrl]="ProgressrequestInput"></validation-messages>
            </div>
            <div class="col-md-2">
              <label for="Materialsupply">材料提供 *</label>
            </div>
            <div class="form-group col-md-4">
              <input id="Materialsupply" type="text" #MaterialsupplyInput name="Materialsupply" class="form-control"
                [(ngModel)]="_processingViewDto.materialsupply" required>
              <validation-messages [formCtrl]="MaterialsupplyInput"></validation-messages>
            </div>
          </div>
          <div class="row">
            <div class="col-md-2">
              <label for="Unitprice">单价 *</label>
            </div>
            <div class="form-group col-md-4">
              <input id="Unitprice" type="text" #UnitpriceInput="ngModel" name="Unitprice" class="form-control"
                [(ngModel)]="_processingViewDto.unitprice" required maxlength="24" />
              <validation-messages [formCtrl]="UnitpriceInput"></validation-messages>
            </div>
            <div class="col-md-2">
              <label for="Explain">备注 </label>
            </div>
            <div class="form-group col-md-4">
              <input id="Explain" type="text" #ExplainInput name="Explain" class="form-control"
                [(ngModel)]="_processingViewDto.explain" >
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">
            取消
          </button>
          <button type="submit" class="btn btn-primary" [disabled]="!userForm.form.valid" [buttonBusy]="saving"
            [busyText]="l('SavingWithThreeDot')">
            <i class="fa fa-save"></i> <span>保存</span>
          </button>
        </div>
      </form>
    </div>
  </div>
</div>